﻿
Type CompositorManager
	Global _instance:CompositorManager
	
	
	Method New()
		Self._instance = Self
	End Method
	
	
	Function getSingleton:CompositorManager()
		Return CompositorManager._instance
	End Function
	
rem
bbdoc: Add a compositor to a viewport.
about: <p>By default, it is added to end of the chain, after the other compositors.</p>
<p><b>Parameter:</b></p>
<table cellpadding="4" cellspacing="4" border="0">
<tr><td><i>vp</i></td><td>Viewport to modify</td></tr>
<tr><td><i>compositor</i></td><td>The name of the compositor to apply</td></tr>
<tr><td><i>addPosition</i></td><td>At which position to add, defaults to the end (-1).</td></tr>
</table>
endrem
	Method addCompositor:CompositorInstance(vport:Viewport, compositor:String, addPosition:Int = -1)
		Local ci:CompositorInstance = New CompositorInstance
		ci._ptr = o_addCompositor(vport._ptr, compositor.ToCString(), addPosition)
		Return ci
	End Method
	
rem

endrem
	Method setCompositorEnabled(vport:Viewport, compositor:String, enabled:Byte = True)
		o_setCompositorEnabled(vport._ptr, compositor.ToCString(), enabled)
	End Method
End Type